import { requestCommon } from "./request";
import type { PageResponse } from "./types";

/**
 * @description: 获取用户信息
 */
export function getUserInfo() {
  return requestCommon({
    url: '/login/info',
    method: 'POST'
  });
}

/**
 * @description: 用户登录
 */
export function login(data: { username: string, password: string }) {
  return requestCommon<PageResponse>({
    url: '/login/auth',
    method: 'POST',
    data,
  });
}